﻿Public Class FactoryTriangulo
    Inherits FactoryTrianguloMethod

    Public Overrides Function CreateTriangulo(ladoA As Integer, ladoB As Integer, ladoC As Integer) As Triangulo
        If ladoA = ladoB And ladoA = ladoC Then
            Return New TrianguloEquilatero(ladoA, ladoB, ladoC)
        ElseIf ladoA <> ladoB And ladoA <> ladoC And ladoB <> ladoC Then
            Return New TrianguloEscaleno(ladoA, ladoB, ladoC)
        Else
            Return New TrianguloIsosceles(ladoA, ladoB, ladoC)
        End If
    End Function
End Class
